<template>
  <div class="index">
    <h1> wo shi shouye </h1>
    <!-- style="height:200px;width:200px;" -->
    <div id="my">
      <Ground style="height:400px;width:400px;" :data="datas"></Ground>
      <!-- <Ground style="height:400px;width:400px;"></Ground> -->
       <Ground style="height:400px;width:400px;" :data="datas"></Ground>
    </div>
  
  </div>
</template>

<script>
  // 引入echarts
  import echarts, { registerLoading } from 'echarts'
  import Ground from "@/components/charts/ground.vue"
  import {getCharts} from "@/network/login"
  export default {
    name: "Index",
    data() {
      return {
        datas:[]
      }
    },
    components: {
        Ground
    },
    created(){
      this.getChartsM()
    },
    methods:{
      getChartsM(){
        getCharts("/charts").then(res=>{
          console.log(res.data.x);
          this.datas=res.data.x
        })
      }
    }
  }
</script>

<style scoped lang="less">
  .index {
    width: 100%;
    height: 100%;
    background: #fff;
  }
</style>